<template>
  <div class="swiper zIndexSub abs">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" :show-indicators="false">
      <div v-for="(item,index) in bannerList" :key="index">
        <van-swipe-item>
          <img :src=item>
        </van-swipe-item>
      </div>
    </van-swipe>
  </div>
</template>

<script>
import Vue from 'vue';
import {Swipe, SwipeItem} from 'vant';

Vue.use(Swipe);
Vue.use(SwipeItem);
export default {
  name: "swiper",
  props: {
    bannerList:{
      type:Array,
      default(){
        return[require("@/assets/logo.png"),require("@/assets/logo.png")]
      }
    }
  },
  data() {
    return {
      false: false
    }
  }
}
</script>

<style scoped>
.swiper {

}
.my-swipe {
  width: 100%;
  height: 5rem;
}

.my-swipe img {
  width: 100%;
  height: 5rem;
}

.abs {
  position: absolute;
  width: 100%;
}

.zIndexSub {
  z-index: -1;
}
</style>